<clr-modal [clrModalSize]="''" [(clrModalOpen)]="modalOpened">
  <h3 class="modal-title">{{title}}</h3>
  <div class="modal-body">
    <form #publishForm="ngForm">
      <section class="form-block">
        <div class="form-group" style="padding-left: 100px;">
          <label class="col-md-3 form-group-label-override required">机房</label>
          <div *ngFor="let cluster of clusters" style="padding-right: 15px" class="checkbox-inline"
               style="margin-top: 0px">
            <div class="checkbox">
              <input [(ngModel)]="cluster['checked']"
                     type="checkbox"
                     id="{{cluster.name}}-check"
                     name="{{cluster.name}}-check">
              <label for="{{cluster.name}}-check">{{cluster.name}}</label>
            </div>
          </div>
        </div>
        <div *ngIf="actionType==3" class="form-group" style="padding-left: 135px;">
          <label class="col-md-3 form-group-label-override">强制下线
            <a role="tooltip" aria-haspopup="true" class="tooltip tooltip-lg">
              <clr-icon shape="info-circle" size="24"></clr-icon>
              <span class="tooltip-content">确认资源已经不存在于Kubernetes，可以打开此开关强制下线</span>
            </a>
          </label>
          <div class="toggle-switch" style="top: .25rem">
            <input [(ngModel)]="forceOffline" type="checkbox" id="force-offline-id" name="force-offline">
            <label for="force-offline-id"></label>
          </div>
        </div>
      </section>
    </form>
    <div class="modal-footer">
      <button type="button" class="btn btn-outline" (click)="onCancel()">取消</button>
      <button type="button" class="btn btn-primary" [disabled]="!isValid" (click)="onSubmit()">确定</button>
    </div>
  </div>

</clr-modal>
